define('framework/commons/GillionScopeModule', [
    'angular'
],function (angular) {
    return angular.module('GillionScopeModule', [])
        .factory('Params', ['$rootScope', '$window', function ($rootScope, $window) {
            var href = $window.location.href,
                paramString = href.split('?')[1],
                params = {};
            if (!!paramString) {
                angular.forEach(paramString.split('&'), function (paramToken) {
                    var paramKeyValAry = paramToken.split('='),
                        key = paramKeyValAry[0],
                        val = decodeURIComponent(paramKeyValAry[1]);
                    params[key] = val;
                });
            }
            $rootScope['params'] = params;
            return params;
        }]);
});